package com.zqu.service.impl;

import com.zqu.mapper.LoginUserMapper;
import com.zqu.pojo.LoginUser;
import com.zqu.service.LoginUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LoginUserServiceImpl implements LoginUserService {
    @Autowired(required = false)
    private LoginUserMapper loginUserMapper;

    @Override
    public LoginUser selectLoginUserById(long id) {
        return loginUserMapper.selectTById(id);
    }

    @Override
    public LoginUser queryLoginUser(String userName) {
        return loginUserMapper.queryLoginUser(userName);
    }

    @Override
    public List<LoginUser> selectList(LoginUser loginUser) {
        return loginUserMapper.selectList(loginUser);
    }

    @Override
    public boolean insertLoginUser(LoginUser loginUser) {
        return loginUserMapper.insertT(loginUser)>0;
    }

    @Override
    public boolean updateLoginUser(LoginUser loginUser) {
        return loginUserMapper.updateT(loginUser)>0;
    }

    @Override
    public boolean deleteLoginUser(long id) {
        return loginUserMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteLoginUserByIds(String[] ids) {
        return loginUserMapper.deleteTByIds(ids)>0;
    }


}
